package com.adingxiong.cft.design.servicelocation;

/**
 * @ClassName InitContext
 * @Description
 * @Author xiongchao
 * @Date 2021/1/8 9:26
 **/
public class InitContext {

    public Object lookup(String jidoName) {
        if("service1".equalsIgnoreCase(jidoName)){
            return new Service1();
        }else if ("service2".equalsIgnoreCase(jidoName)){
            return new Service2();
        }else {
            return null;
        }
    }
}
